<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:include href="core\form.xsl"/>
	<xsl:include href="core\level0.xsl"/>

<xsl:template match="page">
	<xsl:call-template name="page_content"/>
</xsl:template>

<xsl:template name="page_content">
		<xsl:call-template name="page_navbar_email"/>
	<xsl:call-template name="title_page">
		<xsl:with-param name="titleText">Email to a friend</xsl:with-param>
	</xsl:call-template>

	  <table width="100%">
			<tr><td align="left"><font color="red"><b><xsl:value-of select="email"/></b></font><br/></td></tr>
	  </table>
	  <xsl:apply-templates select="form"/>
		<xsl:call-template name="page_navbar_email"/>
</xsl:template>

<xsl:template match="form">
		<form action="main.asp">
			<input type="Hidden" name="-email_to_a_friend.asp-"/>
		<xsl:copy-of select="@*"/>
		<xsl:apply-templates select="control/input[@type='hidden']"/>
			<table align="center">
							<tr>
								<td colspan="2" align="center" class="imagetitle">Please fill out the information below. All items marked "<font color="red">*</font>" are required entries.</td>
							</tr>		
		  <tr valign="top">
		    <td valign="middle"><b>To:</b></td>
			<td>E-mails (separated by semicolon, if multiple<font color="red">*</font><br/><xsl:apply-templates select="control[@name='to_emails']/input"/></td>
		  </tr>
  		  <tr>
		    <td valign="top" rowspan="2"><b>From:</b></td>
			<td>
			  <table>
				<tr>
				  <td><strong>First Name</strong><font color="red">*</font><br/><xsl:apply-templates select="control[@name='from_first_name']/input"/></td>
				  <td> &#160; </td>
				  <td><xsl:apply-templates select="control[@name='from_last_name']"/></td>
				</tr>
			  </table>
			</td>
		  </tr>
		  <tr><td><strong>E-mail</strong><font color="red">*</font><br/>
<xsl:apply-templates select="control[@name='from_email']/input"/></td></tr>
		  <tr>
		    <td valign="top"><b>Subject</b></td>
			<td><xsl:apply-templates select="control/input[@name='subject']"/></td>
		  </tr>
		  <tr>
		    <td valign="top"><b>Comments</b></td>
			<td><xsl:apply-templates select="control/textarea[@name='user_text']"/></td>
		  </tr>
		  <tr>
		    <td>&#160;</td>
			<td><xsl:apply-templates select="control/input[@name='send_me']"/> Send a copy of this message to me</td>
		  </tr>
   		  <tr>
			<td colspan="2" align="center">
			  <br/>
						<input type="image" value="Email Brochure" name="Submit" src="{$img_path_templates}/{$header_bg_color}/buttons/btn_email.gif" border="0"/>
			</td>
		  </tr>
		</table>
	  </form>
</xsl:template>

	<xsl:template name="page_navbar_email">
		<table cellpadding="4" cellspacing="1" width="100%" align="center">
			<tr align="center">
				<td>
					<a class="linkbold" title="Return to Yacht List">
						<xsl:attribute name="href">
							<xsl:value-of select="//page/view_list_t"/>
						</xsl:attribute><font color="{$color_main_first1}">
						Return to Yacht List</font>
					</a>&#160;&#160;|&#160;<xsl:choose><xsl:when test="/page/theme = 1">
					<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={/page/vessel_id}&amp;curr_id={//page/curr_id}&amp;vd=1" class="linkbold" title="Yacht ID#{/page/vessel_id} Basic Info"><font color="{$color_main_first1}">Yacht Basic Info</font></a></xsl:when><xsl:otherwise>					<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={/page/vessel_id}&amp;curr_id={//page/curr_id}" class="linkbold" title="Yacht ID#{/page/vessel_id} Basic Info"><font color="{$color_main_first1}">Yacht Basic Info</font></a></xsl:otherwise></xsl:choose>&#160;&#160;|&#160;<xsl:choose><xsl:when test="/page/theme = 1"><a href="main.asp?-vessel_detail.asp-&amp;vessel_id={/page/vessel_id}&amp;curr_id={//page/curr_id}&amp;vd=1" class="linkbold" title="Yacht ID#{/page/vessel_id} Details"><font color="{$color_main_first1}">Yacht Details</font></a></xsl:when><xsl:otherwise><a href="main.asp?-vessel_detail.asp-&amp;vessel_id={/page/vessel_id}&amp;curr_id={//page/curr_id}" class="linkbold" title="Yacht ID#{/page/vessel_id} Details"><font color="{$color_main_first1}">Yacht Details</font></a></xsl:otherwise></xsl:choose>&#160;&#160;|&#160;
					<a href="#" title="Print Yacht ID#{/page/vessel_id} Listing" class="linkbold">
						<xsl:choose>
							<xsl:when test="//page/use_own_footer = 1">
								<xsl:attribute name="onClick">
									window.open('<xsl:value-of select="$media_path"/>/brochure_generate_1.asp?vessel_id=<xsl:value-of select="//page/vessel_id"/>&amp;CompanyID=<xsl:value-of select="//page/member_company_id"/>&amp;MemberID=<xsl:value-of select="//page/member_company_id"/>&amp;AccessLevel=<xsl:value-of select="//page/access_level"/>&amp;int_login_id=<xsl:value-of select="//page/login_id"/>&amp;blnPicInlude=<xsl:value-of select="//page/BrochurePreferences/blnPicInclude"/>&amp;blnPrintPageNumbers=<xsl:value-of select="//page/BrochurePreferences/blnPrintPageNumbers"/>&amp;blnPhotos=<xsl:value-of select="//page/BrochurePreferences/blnPhotos"/>&amp;blnNoImage=<xsl:value-of select="//page/BrochurePreferences/blnNoImage"/>&amp;blnOnePage=<xsl:value-of select="//page/BrochurePreferences/blnOnePage"/>&amp;blnQuality=1&amp;blnIncludeLogo=<xsl:value-of select="//page/BrochurePreferences/blnIncludeLogo"/>&amp;blnIncludeContact=5&amp;blnUseHFSpace=<xsl:value-of select="//page/BrochurePreferences/blnUseHFSpace"/>&amp;blnIncludeDetails=<xsl:value-of select="//page/BrochurePreferences/blnIncludeDetails"/>&amp;blnCoverInlude=<xsl:value-of select="//page/BrochurePreferences/blnCoverInlude"/>&amp;blnBrochuresLayOut=<xsl:value-of select="//page/BrochurePreferences/blnBrochuresLayOut"/>&amp;MainProfilePhotoOnly=<xsl:value-of select="//page/BrochurePreferences/blnMainProfileOnly"/>&amp;fldUserFontFace=<xsl:value-of select="//page/BrochurePreferences/blnFontName"/>&amp;fldUserFontSize=<xsl:value-of select="//page/BrochurePreferences/blnFontSize"/>&amp;blnLayout=<xsl:value-of select="//page/BrochurePreferences/blnLayout"/>&amp;intPaperSize=<xsl:value-of select="//page/BrochurePreferences/intPaperSize"/>&amp;OtherSalesman=-2&amp;curr_id=<xsl:value-of select = "//page/curr_id"/>&amp;measure_id=<xsl:value-of select = "//page/measure_id"/>&amp;ph=1&amp;print_full_listing=1&amp;template=1&amp;blnBrochureConsumer=1',null,'height=500,width=700,resizable=yes,scrollbars=yes,toolbar=no,menubar=yes')
								</xsl:attribute>
							</xsl:when>
							<xsl:otherwise>
								<xsl:attribute name="onClick">
									window.open('<xsl:value-of select="$media_path"/>/brochure_generate_1.asp?vessel_id=<xsl:value-of select="//page/vessel_id"/>&amp;CompanyID=<xsl:value-of select="//page/member_company_id"/>&amp;MemberID=<xsl:value-of select="//page/member_company_id"/>&amp;AccessLevel=<xsl:value-of select="//page/access_level"/>&amp;int_login_id=<xsl:value-of select="//page/login_id"/>&amp;blnPicInlude=<xsl:value-of select="//page/BrochurePreferences/blnPicInclude"/>&amp;blnPrintPageNumbers=<xsl:value-of select="//page/BrochurePreferences/blnPrintPageNumbers"/>&amp;blnPhotos=<xsl:value-of select="//page/BrochurePreferences/blnPhotos"/>&amp;blnNoImage=<xsl:value-of select="//page/BrochurePreferences/blnNoImage"/>&amp;blnOnePage=<xsl:value-of select="//page/BrochurePreferences/blnOnePage"/>&amp;blnQuality=1&amp;blnIncludeLogo=<xsl:value-of select="//page/BrochurePreferences/blnIncludeLogo"/>&amp;blnIncludeContact=<xsl:value-of select="//page/BrochurePreferences/blnIncludeContact"/>&amp;blnUseHFSpace=<xsl:value-of select="//page/BrochurePreferences/blnUseHFSpace"/>&amp;blnIncludeDetails=<xsl:value-of select="//page/BrochurePreferences/blnIncludeDetails"/>&amp;blnCoverInlude=<xsl:value-of select="//page/BrochurePreferences/blnCoverInlude"/>&amp;blnBrochuresLayOut=<xsl:value-of select="//page/BrochurePreferences/blnBrochuresLayOut"/>&amp;MainProfilePhotoOnly=<xsl:value-of select="//page/BrochurePreferences/blnMainProfileOnly"/>&amp;fldUserFontFace=<xsl:value-of select="//page/BrochurePreferences/blnFontName"/>&amp;fldUserFontSize=<xsl:value-of select="//page/BrochurePreferences/blnFontSize"/>&amp;blnLayout=<xsl:value-of select="//page/BrochurePreferences/blnLayout"/>&amp;intPaperSize=<xsl:value-of select="//page/BrochurePreferences/intPaperSize"/>&amp;OtherSalesman=-2&amp;curr_id=<xsl:value-of select = "//page/curr_id"/>&amp;measure_id=<xsl:value-of select = "//page/measure_id"/>&amp;ph=1&amp;print_full_listing=1&amp;template=1&amp;blnBrochureConsumer=1',null,'height=500,width=700,resizable=yes,scrollbars=yes,toolbar=no,menubar=yes')
								</xsl:attribute>
							</xsl:otherwise>
						</xsl:choose>
						<font color="{$color_main_first1}">Print Listing</font>
					</a>&#160;&#160;|&#160;
					<a href="{$root}main.asp?-email_send.asp-&amp;vessel_id={//page/vessel_id}&amp;curr_id={//page/curr_id}&amp;is_my={//page/is_featured_vessel}" class="linkbold" title="Contact {/page/rowset/data/row/col[@name]}"><font color="{$color_main_first1}">Contact us</font></a><br/>
					<xsl:if test="/page/vessel/show_view_photos_link">
						<a href="#" title="Yacht ID#{/page/vessel_id} Photos" class="linkbold">
							<xsl:attribute name="onClick">
								window.open('main.asp?-vessel_photos.asp-fvessel_id=<xsl:value-of select="/page/vessel_id"/>',null,'height=500,width=600,resizable=yes,scrollbars=yes')
							</xsl:attribute><font color="{$color_main_first1}">Yacht Photos</font>
						</a>
						<xsl:if test="/page/vessel/show_view_vr_tours_link or /page/vessel/show_view_asf_link">
						&#160;&#160;|&#160;
						</xsl:if>
					</xsl:if>
					<xsl:if test="/page/vessel/show_view_vr_tours_link">
						<a href="#" title="Yacht ID#{/page/vessel_id} VR Tour" class="linkbold">
							<xsl:attribute name="onClick">
								window.open('main.asp?-preview_ivr.asp-fvessel_id=<xsl:value-of select="/page/vessel_id"/>',null,'height=500,width=600,resizable=yes,scrollbars=yes')
							</xsl:attribute><font color="{$color_main_first1}">Yacht VR Tour</font>
						</a><xsl:if test="/page/vessel/show_view_asf_link">&#160;&#160;|&#160;</xsl:if>
					</xsl:if>
					<xsl:if test="/page/vessel/show_view_asf_link">
						<a href="#" title="Yacht ID#{/page/vessel_id} Streaming Video" class="linkbold">
							<xsl:attribute name="onClick">
								window.open('main.asp?-preview_asf.asp-fvessel_id=<xsl:value-of select="/page/vessel_id"/>',null,'height=500,width=600,resizable=yes,scrollbars=yes')
							</xsl:attribute><font color="{$color_main_first1}">Yacht Streaming Video</font>
						</a>
					</xsl:if>					
				</td>
			</tr>
		</table>
	</xsl:template>
</xsl:stylesheet>
